(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 10.4' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       158,          7]
NotebookDataLength[     29849,       1137]
NotebookOptionsPosition[     22747,        907]
NotebookOutlinePosition[     26340,       1010]
CellTagsIndexPosition[     26226,       1004]
WindowTitle->DiracOrder
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell[BoxData[GridBox[{
   {Cell["FEYN CALC SYMBOL", "PacletNameCell"], Cell[TextData[{
     Cell[BoxData[
      ActionMenuBox[
       FrameBox[
        InterpretationBox[Cell[TextData[{
          "See Also",
          StyleBox[" \[FilledDownTriangle]", "AnchorBarArrow",
           StripOnInput->False]
         }]],
         TextCell[
          Row[{"See Also", 
            Style[" \[FilledDownTriangle]", "AnchorBarArrow"]}]]],
        StripOnInput->False], {"\<\"DiracSimplify\"\>":>
       Documentation`HelpLookup[
       "paclet:FeynCalc/ref/DiracSimplify"], "\<\"DiracTrick\"\>":>
       Documentation`HelpLookup["paclet:FeynCalc/ref/DiracTrick"]},
       Appearance->None,
       MenuAppearance->Automatic,
       MenuStyle->"SeeAlso"]],
      LineSpacing->{1.4, 0}],
     "\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\[ThickSpace]\
\[ThickSpace]",
     Cell[BoxData[
      ActionMenuBox[
       FrameBox[
        InterpretationBox[Cell[TextData[{
          "URL",
          StyleBox[" \[FilledDownTriangle]", "AnchorBarArrow",
           StripOnInput->False]
         }]],
         TextCell[
          Row[{"URL", 
            Style[" \[FilledDownTriangle]", "AnchorBarArrow"]}]]],
        StripOnInput->False], {"\<\"FeynCalc/ref/DiracOrder\"\>":>
       None, "\<\"Copy Wolfram Documentation Center URL\"\>":>
       Module[{DocumentationSearch`Private`nb$}, 
        DocumentationSearch`Private`nb$ = NotebookPut[
           Notebook[{
             Cell["FeynCalc/ref/DiracOrder"]}, Visible -> False]]; 
        SelectionMove[DocumentationSearch`Private`nb$, All, Notebook]; 
        FrontEndTokenExecute[DocumentationSearch`Private`nb$, "Copy"]; 
        NotebookClose[DocumentationSearch`Private`nb$]; Null], 
       Delimiter, "\<\"Copy web URL\"\>":>
       Module[{DocumentationSearch`Private`nb$}, 
        DocumentationSearch`Private`nb$ = NotebookPut[
           Notebook[{
             Cell[
              BoxData[
               MakeBoxes[
                Hyperlink[
                "http://reference.wolfram.com/language/FeynCalc/ref/\
DiracOrder.html"], StandardForm]], "Input", TextClipboardType -> 
              "PlainText"]}, Visible -> False]]; 
        SelectionMove[DocumentationSearch`Private`nb$, All, Notebook]; 
        FrontEndTokenExecute[DocumentationSearch`Private`nb$, "Copy"]; 
        NotebookClose[DocumentationSearch`Private`nb$]; 
        Null], "\<\"Go to web URL\"\>":>FrontEndExecute[{
         NotebookLocate[{
           URL[
            StringJoin[
             If[
              TrueQ[DocumentationBuild`Make`Private`wsmlinkQ$67287], 
              "http://reference.wolfram.com/system-modeler/", 
              "http://reference.wolfram.com/language/"], 
             "FeynCalc/ref/DiracOrder", ".html"]], None}]}]},
       Appearance->None,
       MenuAppearance->Automatic,
       MenuStyle->"URLMenu"]],
      LineSpacing->{1.4, 0}]
    }], "AnchorBar"]}
  }]], "AnchorBarGrid",
 GridBoxOptions->{GridBoxItemSize->{"Columns" -> {
     Scaled[0.65], {
      Scaled[0.34]}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, 
   "RowsIndexed" -> {}}},
 CellID->1],

Cell[TextData[{
 Cell["DiracOrder", "ObjectName"],
 Cell[BoxData[
  InterpretationBox[
   StyleBox[
    GraphicsBox[{},
     BaselinePosition->Baseline,
     ImageSize->{8, 0}],
    CacheGraphics->False],
   Spacer[8]]]],
 Cell[BoxData[""], "ObjectNameTranslation"]
}], "ObjectNameGrid"],

Cell[CellGroupData[{

Cell[BoxData[GridBox[{
   {"", Cell[TextData[{
     Cell[BoxData[
      RowBox[{"DiracOrder", "[", "exp", "]"}]], "InlineFormula"],
     " \[LineSeparator]orders the Dirac matrices in ",
     Cell[BoxData["exp"], "InlineFormula"],
     " lexicographically."
    }]]},
   {"", Cell[TextData[{
     Cell[BoxData[
      RowBox[{"DiracOrder", "[", 
       RowBox[{"exp", ",", " ", "orderlist"}], "]"}]], "InlineFormula"],
     " \[LineSeparator] orders the Dirac matrices in ",
     Cell[BoxData["exp"], "InlineFormula"],
     " according to ",
     Cell[BoxData["orderlist"], "InlineFormula"],
     "."
    }]]}
  }]], "Usage",
 GridBoxOptions->{
 GridBoxBackground->{
  "Columns" -> {{None}}, "ColumnsIndexed" -> {}, "Rows" -> {None, {None}}, 
   "RowsIndexed" -> {}}},
 CellID->2090318364],

Cell[CellGroupData[{

Cell[TextData[Cell[BoxData[
 ButtonBox[Cell[TextData[{
   Cell[BoxData[
    InterpretationBox[
     StyleBox[
      GraphicsBox[{},
       BaselinePosition->Baseline,
       ImageSize->{6, 0}],
      CacheGraphics->False],
     Spacer[6]]]],
   "Details"
  }], "NotesFrameText"],
  Appearance->{Automatic, None},
  BaseStyle->None,
  ButtonFunction:>(FrontEndExecute[{
     FrontEnd`SelectionMove[
      FrontEnd`SelectedNotebook[], All, ButtonCell], 
     FrontEndToken["OpenCloseGroup"], 
     FrontEnd`SelectionMove[
      FrontEnd`SelectedNotebook[], After, CellContents]}]& ),
  Evaluator->None,
  Method->"Preemptive"]]]], "NotesSection",
 WholeCellGroupOpener->True,
 CellGroupingRules->{"SectionGrouping", 50},
 CellID->465350948],

Cell["", "SectionHeaderSpacer"],

Cell[TextData[{
 "DiracOrder is also an option of ",
 ButtonBox["DiracSimplify",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DiracSimplify",
  ButtonNote->"DiracSimplify"],
 " and some other functions dealing with Dirac algebra. If set to True, the \
function ",
 ButtonBox["DiracOrder",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DiracOrder",
  ButtonNote->"DiracOrder"],
 " will be applied to the intermediate result to reorder the Dirac matrices \
lexicographically."
}], "Notes"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Options", "[", "DiracOrder", "]"}]], "Input",
 CellLabel->"In[159]:="],

Cell[BoxData[
 FormBox[
  RowBox[{"{", 
   RowBox[{
    RowBox[{"DiracTrick", "\[Rule]", "True"}], ",", 
    RowBox[{"DiracGammaCombine", "\[Rule]", "False"}], ",", 
    RowBox[{"FCDiracIsolate", "\[Rule]", "True"}], ",", 
    RowBox[{"FeynCalcInternal", "\[Rule]", "False"}], ",", 
    RowBox[{"FCJoinDOTs", "\[Rule]", "True"}], ",", 
    RowBox[{"FeynCalcExternal", "\[Rule]", "False"}], ",", 
    RowBox[{"FCVerbose", "\[Rule]", "False"}], ",", 
    RowBox[{"MaxIterations", "\[Rule]", "\[Infinity]"}]}], "}"}], 
  TraditionalForm]], "Output",
 ImageSize->{433, 54},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellLabel->"Out[159]="]
}, Open  ]]
}, Closed]]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  InterpretationBox[
   StyleBox[
    GraphicsBox[{},
     BaselinePosition->Baseline,
     ImageSize->{6, 0}],
    CacheGraphics->False],
   Spacer[6]]]],
 "Examples",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(5)", "ExampleCount"]
}], "PrimaryExamplesSection",
 WholeCellGroupOpener->True,
 CellTags->"PrimaryExamplesSection",
 CellID->1249294874],

Cell[CellGroupData[{

Cell[TextData[{
 "Basic Examples",
 "\[NonBreakingSpace]\[NonBreakingSpace]",
 Cell["(5)", "ExampleCount"]
}], "ExampleSection", "ExampleSection",
 WholeCellGroupOpener->True,
 CellID->745384244],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{" ", 
  RowBox[{"GA", "[", 
   RowBox[{"\[Beta]", ",", "\[Alpha]"}], "]"}]}]], "Input",
 CellTags->"DiracOrder",
 CellLabel->"In[1]:=",
 CellID->1559113060],

Cell[BoxData[
 FormBox[
  RowBox[{
   FormBox[
    SuperscriptBox[
     OverscriptBox["\[Gamma]", "_"], 
     FormBox[
      FormBox["\[Beta]",
       TraditionalForm],
      TraditionalForm]],
    TraditionalForm], ".", 
   FormBox[
    SuperscriptBox[
     OverscriptBox["\[Gamma]", "_"], 
     FormBox[
      FormBox["\[Alpha]",
       TraditionalForm],
      TraditionalForm]],
    TraditionalForm]}], TraditionalForm]], "Output",
 ImageSize->{51, 18},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellTags->"DiracOrder",
 CellLabel->"Out[1]="]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"DiracOrder", "[", "%", "]"}]], "Input",
 CellTags->"DiracOrder",
 CellLabel->"In[2]:=",
 CellID->1074180519],

Cell[BoxData[
 FormBox[
  RowBox[{
   RowBox[{"2", " ", 
    SuperscriptBox[
     OverscriptBox["g", "_"], 
     RowBox[{
      FormBox[
       FormBox["\[Alpha]",
        TraditionalForm],
       TraditionalForm], 
      FormBox[
       FormBox["\[Beta]",
        TraditionalForm],
       TraditionalForm]}]]}], "-", 
   RowBox[{
    SuperscriptBox[
     OverscriptBox["\[Gamma]", "_"], 
     FormBox[
      FormBox["\[Alpha]",
       TraditionalForm],
      TraditionalForm]], ".", 
    SuperscriptBox[
     OverscriptBox["\[Gamma]", "_"], 
     FormBox[
      FormBox["\[Beta]",
       TraditionalForm],
      TraditionalForm]]}]}], TraditionalForm]], "Output",
 ImageSize->{114, 18},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellTags->"DiracOrder",
 CellLabel->"Out[2]="]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell["\t", "ExampleDelimiter"],
  $Line = 0; Null]], "ExampleDelimiter"],

Cell[TextData[{
 ButtonBox["DiracOrder",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DiracOrder",
  ButtonNote->"DiracOrder"],
 " also works with Dirac matrices in  ",
 Cell[BoxData["D"], "InlineFormula"],
 "-dimensions."
}], "Notes"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"GAD", "[", 
  RowBox[{"\[Rho]", ",", "\[Nu]", ",", "\[Mu]", ",", "\[Nu]"}], 
  "]"}]], "Input",
 CellTags->"DiracOrder",
 CellLabel->"In[1]:=",
 CellID->1789420924],

Cell[BoxData[
 FormBox[
  RowBox[{
   FormBox[
    SuperscriptBox["\[Gamma]", 
     FormBox[
      FormBox["\[Rho]",
       TraditionalForm],
      TraditionalForm]],
    TraditionalForm], ".", 
   FormBox[
    SuperscriptBox["\[Gamma]", 
     FormBox[
      FormBox["\[Nu]",
       TraditionalForm],
      TraditionalForm]],
    TraditionalForm], ".", 
   FormBox[
    SuperscriptBox["\[Gamma]", 
     FormBox[
      FormBox["\[Mu]",
       TraditionalForm],
      TraditionalForm]],
    TraditionalForm], ".", 
   FormBox[
    SuperscriptBox["\[Gamma]", 
     FormBox[
      FormBox["\[Nu]",
       TraditionalForm],
      TraditionalForm]],
    TraditionalForm]}], TraditionalForm]], "Output",
 ImageSize->{94, 16},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellTags->"DiracOrder",
 CellLabel->"Out[1]="]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"DiracOrder", "[", "%", "]"}]], "Input",
 CellTags->"DiracOrder",
 CellLabel->"In[2]:=",
 CellID->1481569664],

Cell[BoxData[
 FormBox[
  RowBox[{
   RowBox[{
    RowBox[{"(", 
     RowBox[{"D", "-", "2"}], ")"}], " ", 
    RowBox[{
     SuperscriptBox["\[Gamma]", 
      FormBox[
       FormBox["\[Mu]",
        TraditionalForm],
       TraditionalForm]], ".", 
     SuperscriptBox["\[Gamma]", 
      FormBox[
       FormBox["\[Rho]",
        TraditionalForm],
       TraditionalForm]]}]}], "-", 
   RowBox[{"2", " ", 
    RowBox[{"(", 
     RowBox[{"D", "-", "2"}], ")"}], " ", 
    SuperscriptBox["g", 
     RowBox[{
      FormBox[
       FormBox["\[Mu]",
        TraditionalForm],
       TraditionalForm], 
      FormBox[
       FormBox["\[Rho]",
        TraditionalForm],
       TraditionalForm]}]]}]}], TraditionalForm]], "Output",
 ImageSize->{218, 16},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellTags->"DiracOrder",
 CellLabel->"Out[2]="]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell["\t", "ExampleDelimiter"],
  $Line = 0; Null]], "ExampleDelimiter"],

Cell[TextData[{
 "By default ",
 Cell[BoxData[
  SuperscriptBox["\[Gamma]", "5"]], "InlineFormula"],
 " is moved to the right."
}], "Notes"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"GA", "[", 
  RowBox[{"5", ",", "\[Mu]", ",", "\[Nu]"}], "]"}]], "Input",
 CellTags->"DiracOrder",
 CellLabel->"In[1]:=",
 CellID->2005079104],

Cell[BoxData[
 FormBox[
  RowBox[{
   FormBox[
    SuperscriptBox[
     OverscriptBox["\[Gamma]", "_"], 
     FormBox["5",
      TraditionalForm]],
    TraditionalForm], ".", 
   FormBox[
    SuperscriptBox[
     OverscriptBox["\[Gamma]", "_"], 
     FormBox[
      FormBox["\[Mu]",
       TraditionalForm],
      TraditionalForm]],
    TraditionalForm], ".", 
   FormBox[
    SuperscriptBox[
     OverscriptBox["\[Gamma]", "_"], 
     FormBox[
      FormBox["\[Nu]",
       TraditionalForm],
      TraditionalForm]],
    TraditionalForm]}], TraditionalForm]], "Output",
 ImageSize->{73, 19},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellTags->"DiracOrder",
 CellLabel->"Out[1]="]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"DiracOrder", "[", "%", "]"}]], "Input",
 CellTags->"DiracOrder",
 CellLabel->"In[2]:=",
 CellID->1342940029],

Cell[BoxData[
 FormBox[
  RowBox[{
   SuperscriptBox[
    OverscriptBox["\[Gamma]", "_"], 
    FormBox[
     FormBox["\[Mu]",
      TraditionalForm],
     TraditionalForm]], ".", 
   SuperscriptBox[
    OverscriptBox["\[Gamma]", "_"], 
    FormBox[
     FormBox["\[Nu]",
      TraditionalForm],
     TraditionalForm]], ".", 
   SuperscriptBox[
    OverscriptBox["\[Gamma]", "_"], 
    FormBox["5",
     TraditionalForm]]}], TraditionalForm]], "Output",
 ImageSize->{73, 19},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellTags->"DiracOrder",
 CellLabel->"Out[2]="]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"GA", "[", 
  RowBox[{"6", ",", "\[Mu]", ",", "7"}], "]"}]], "Input",
 CellTags->"DiracOrder",
 CellLabel->"In[3]:=",
 CellID->71636230],

Cell[BoxData[
 FormBox[
  RowBox[{
   FormBox[
    SuperscriptBox[
     OverscriptBox["\[Gamma]", "_"], 
     FormBox["6",
      TraditionalForm]],
    TraditionalForm], ".", 
   FormBox[
    SuperscriptBox[
     OverscriptBox["\[Gamma]", "_"], 
     FormBox[
      FormBox["\[Mu]",
       TraditionalForm],
      TraditionalForm]],
    TraditionalForm], ".", 
   FormBox[
    SuperscriptBox[
     OverscriptBox["\[Gamma]", "_"], 
     FormBox["7",
      TraditionalForm]],
    TraditionalForm]}], TraditionalForm]], "Output",
 ImageSize->{73, 18},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellTags->"DiracOrder",
 CellLabel->"Out[3]="]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"DiracOrder", "[", "%", "]"}]], "Input",
 CellTags->"DiracOrder",
 CellLabel->"In[4]:=",
 CellID->332885129],

Cell[BoxData[
 FormBox[
  RowBox[{
   SuperscriptBox[
    OverscriptBox["\[Gamma]", "_"], 
    FormBox[
     FormBox["\[Mu]",
      TraditionalForm],
     TraditionalForm]], ".", 
   SuperscriptBox[
    OverscriptBox["\[Gamma]", "_"], 
    FormBox["7",
     TraditionalForm]]}], TraditionalForm]], "Output",
 ImageSize->{49, 18},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellTags->"DiracOrder",
 CellLabel->"Out[4]="]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell["\t", "ExampleDelimiter"],
  $Line = 0; Null]], "ExampleDelimiter"],

Cell[TextData[{
 Cell[BoxData["orderlist"], "InlineFormula"],
 " comes into play when we need an ordering that is not lexicographic"
}], "Notes"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"GA", "[", 
  RowBox[{"\[Alpha]", ",", "\[Beta]", ",", "\[Delta]"}], "]"}]], "Input",
 CellTags->"DiracOrder",
 CellLabel->"In[1]:=",
 CellID->1751727580],

Cell[BoxData[
 FormBox[
  RowBox[{
   FormBox[
    SuperscriptBox[
     OverscriptBox["\[Gamma]", "_"], 
     FormBox[
      FormBox["\[Alpha]",
       TraditionalForm],
      TraditionalForm]],
    TraditionalForm], ".", 
   FormBox[
    SuperscriptBox[
     OverscriptBox["\[Gamma]", "_"], 
     FormBox[
      FormBox["\[Beta]",
       TraditionalForm],
      TraditionalForm]],
    TraditionalForm], ".", 
   FormBox[
    SuperscriptBox[
     OverscriptBox["\[Gamma]", "_"], 
     FormBox[
      FormBox["\[Delta]",
       TraditionalForm],
      TraditionalForm]],
    TraditionalForm]}], TraditionalForm]], "Output",
 ImageSize->{75, 18},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellTags->"DiracOrder",
 CellLabel->"Out[1]="]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"DiracOrder", "[", "%", "]"}]], "Input",
 CellLabel->"In[2]:="],

Cell[BoxData[
 FormBox[
  RowBox[{
   SuperscriptBox[
    OverscriptBox["\[Gamma]", "_"], 
    FormBox[
     FormBox["\[Alpha]",
      TraditionalForm],
     TraditionalForm]], ".", 
   SuperscriptBox[
    OverscriptBox["\[Gamma]", "_"], 
    FormBox[
     FormBox["\[Beta]",
      TraditionalForm],
     TraditionalForm]], ".", 
   SuperscriptBox[
    OverscriptBox["\[Gamma]", "_"], 
    FormBox[
     FormBox["\[Delta]",
      TraditionalForm],
     TraditionalForm]]}], TraditionalForm]], "Output",
 ImageSize->{75, 18},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellLabel->"Out[2]="]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"DiracOrder", "[", 
  RowBox[{
   RowBox[{"GA", "[", 
    RowBox[{"\[Alpha]", ",", "\[Beta]", ",", "\[Delta]"}], "]"}], ",", 
   RowBox[{"{", 
    RowBox[{"\[Delta]", ",", "\[Beta]", ",", "\[Alpha]"}], "}"}]}], 
  "]"}]], "Input",
 CellLabel->"In[3]:="],

Cell[BoxData[
 FormBox[
  RowBox[{
   RowBox[{"-", 
    RowBox[{
     SuperscriptBox[
      OverscriptBox["\[Gamma]", "_"], 
      FormBox[
       FormBox["\[Delta]",
        TraditionalForm],
       TraditionalForm]], ".", 
     SuperscriptBox[
      OverscriptBox["\[Gamma]", "_"], 
      FormBox[
       FormBox["\[Beta]",
        TraditionalForm],
       TraditionalForm]], ".", 
     SuperscriptBox[
      OverscriptBox["\[Gamma]", "_"], 
      FormBox[
       FormBox["\[Alpha]",
        TraditionalForm],
       TraditionalForm]]}]}], "+", 
   RowBox[{"2", " ", 
    SuperscriptBox[
     OverscriptBox["\[Gamma]", "_"], 
     FormBox[
      FormBox["\[Delta]",
       TraditionalForm],
      TraditionalForm]], " ", 
    SuperscriptBox[
     OverscriptBox["g", "_"], 
     RowBox[{
      FormBox[
       FormBox["\[Alpha]",
        TraditionalForm],
       TraditionalForm], 
      FormBox[
       FormBox["\[Beta]",
        TraditionalForm],
       TraditionalForm]}]]}], "-", 
   RowBox[{"2", " ", 
    SuperscriptBox[
     OverscriptBox["\[Gamma]", "_"], 
     FormBox[
      FormBox["\[Beta]",
       TraditionalForm],
      TraditionalForm]], " ", 
    SuperscriptBox[
     OverscriptBox["g", "_"], 
     RowBox[{
      FormBox[
       FormBox["\[Alpha]",
        TraditionalForm],
       TraditionalForm], 
      FormBox[
       FormBox["\[Delta]",
        TraditionalForm],
       TraditionalForm]}]]}], "+", 
   RowBox[{"2", " ", 
    SuperscriptBox[
     OverscriptBox["\[Gamma]", "_"], 
     FormBox[
      FormBox["\[Alpha]",
       TraditionalForm],
      TraditionalForm]], " ", 
    SuperscriptBox[
     OverscriptBox["g", "_"], 
     RowBox[{
      FormBox[
       FormBox["\[Beta]",
        TraditionalForm],
       TraditionalForm], 
      FormBox[
       FormBox["\[Delta]",
        TraditionalForm],
       TraditionalForm]}]]}]}], TraditionalForm]], "Output",
 ImageSize->{341, 18},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellLabel->"Out[3]="]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell["\t", "ExampleDelimiter"],
  $Line = 0; Null]], "ExampleDelimiter"],

Cell[TextData[{
 "Reordering of Dirac matrices in long chains is expensive, so that ",
 ButtonBox["DiracSimplify",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DiracSimplify",
  ButtonNote->"DiracSimplify"],
 " does not do it by default."
}], "Notes"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"DiracSimplify", "[", 
  RowBox[{
   RowBox[{"GAD", "[", 
    RowBox[{"\[Mu]", ",", "\[NoBreak]", "\[Nu]"}], "]"}], "+", 
   RowBox[{"GAD", "[", 
    RowBox[{"\[Nu]", ",", "\[Mu]"}], "]"}]}], "]"}]], "Input",
 CellLabel->"In[1]:="],

Cell[BoxData[
 FormBox[
  RowBox[{
   RowBox[{
    SuperscriptBox["\[Gamma]", 
     FormBox[
      FormBox["\[Mu]",
       TraditionalForm],
      TraditionalForm]], ".", 
    SuperscriptBox["\[Gamma]", 
     FormBox[
      FormBox["\[Nu]",
       TraditionalForm],
      TraditionalForm]]}], "+", 
   RowBox[{
    SuperscriptBox["\[Gamma]", 
     FormBox[
      FormBox["\[Nu]",
       TraditionalForm],
      TraditionalForm]], ".", 
    SuperscriptBox["\[Gamma]", 
     FormBox[
      FormBox["\[Mu]",
       TraditionalForm],
      TraditionalForm]]}]}], TraditionalForm]], "Output",
 ImageSize->{106, 16},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellLabel->"Out[1]="]
}, Open  ]],

Cell[TextData[{
 "However, if you know that it can lead to simpler expressions, you can \
activate the reordering via the option ",
 ButtonBox["DiracOrder",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DiracOrder",
  ButtonNote->"DiracOrder"],
 "."
}], "Notes"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"DiracSimplify", "[", 
  RowBox[{
   RowBox[{
    RowBox[{"GAD", "[", 
     RowBox[{"\[Mu]", ",", "\[NoBreak]", "\[Nu]"}], "]"}], "+", 
    RowBox[{"GAD", "[", 
     RowBox[{"\[Nu]", ",", "\[Mu]"}], "]"}]}], ",", 
   RowBox[{"DiracOrder", "\[Rule]", "True"}]}], "]"}]], "Input",
 CellLabel->"In[2]:="],

Cell[BoxData[
 FormBox[
  RowBox[{"2", " ", 
   SuperscriptBox["g", 
    RowBox[{
     FormBox[
      FormBox["\[Mu]",
       TraditionalForm],
      TraditionalForm], 
     FormBox[
      FormBox["\[Nu]",
       TraditionalForm],
      TraditionalForm]}]]}], TraditionalForm]], "Output",
 ImageSize->{47, 16},
 ImageMargins->{{0, 0}, {0, 0}},
 ImageRegion->{{0, 1}, {0, 1}},
 CellLabel->"Out[2]="]
}, Open  ]]
}, Open  ]]
}, Open  ]],

Cell["", "SectionFooterSpacer"]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[{
 Cell[BoxData[
  InterpretationBox[
   StyleBox[
    GraphicsBox[{},
     BaselinePosition->Baseline,
     ImageSize->{6, 0}],
    CacheGraphics->False],
   Spacer[6]]]],
 "See Also"
}], "SeeAlsoSection",
 WholeCellGroupOpener->True,
 CellID->1255426704],

Cell[TextData[{
 StyleBox[ButtonBox["DiracSimplify",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DiracSimplify",
  ButtonNote->"DiracSimplify"],
  FontFamily->"Verdana"],
 ", ",
 StyleBox[ButtonBox["DiracTrick",
  BaseStyle->"Link",
  ButtonData->"paclet:FeynCalc/ref/DiracTrick",
  ButtonNote->"DiracTrick"],
  FontFamily->"Verdana"],
 "."
}], "SeeAlso"]
}, Open  ]],

Cell[" ", "FooterCell"]
},
Saveable->False,
ScreenStyleEnvironment->"Working",
WindowSize->{725, 750},
WindowMargins->{{-10, Automatic}, {Automatic, -8}},
WindowTitle->"DiracOrder",
TaggingRules->{
 "ModificationHighlight" -> False, "ColorType" -> "SymbolColor", "LinkTrails" -> 
  GridBox[{{
      RowBox[{
        ButtonBox[
        "FeynCalc", ButtonData -> "paclet:FeynCalc/guide/FeynCalc", 
         BaseStyle -> {"Link", "DockedLinkTrail"}]}]}}, ColumnAlignments -> 
    Left], "HasOptions" -> False, "ExampleCounter" -> 1, "NeedPlatMsgIn" -> 
  None, "RootCaptions" -> "", 
  "Metadata" -> {
   "built" -> "{2020, 6, 20, 19, 4, 2.272385}", 
    "history" -> {"9.0", "", "", ""}, "context" -> "FeynCalc`", 
    "keywords" -> {}, "specialkeywords" -> {}, 
    "tutorialcollectionlinks" -> {}, "index" -> True, "label" -> 
    "Feyn Calc Symbol", "language" -> "en", "paclet" -> "FeynCalc", "status" -> 
    "None", "summary" -> 
    "DiracOrder[exp] orders the Dirac matrices in exp lexicographically. \
DiracOrder[exp, orderlist] orders the Dirac matrices in exp according to \
orderlist.", "synonyms" -> {}, "tabletags" -> {}, "title" -> "DiracOrder", 
    "titlemodifier" -> "", "windowtitle" -> "DiracOrder", "type" -> "Symbol", 
    "uri" -> "FeynCalc/ref/DiracOrder"}, "SearchTextTranslated" -> ""},
CellContext->"Global`",
FrontEndVersion->"10.4 for Linux x86 (64-bit) (April 11, 2016)",
StyleDefinitions->Notebook[{
   Cell[
    StyleData[
    StyleDefinitions -> FrontEnd`FileName[{"Wolfram"}, "Reference.nb"]]], 
   Cell[
    StyleData["Input"], CellContext -> "Global`"], 
   Cell[
    StyleData["Output"], CellContext -> "Global`"]}, Visible -> False, 
  FrontEndVersion -> "10.4 for Linux x86 (64-bit) (April 11, 2016)", 
  StyleDefinitions -> "Default.nb"]
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{
 "PrimaryExamplesSection"->{
  Cell[6953, 214, 388, 15, 31, "PrimaryExamplesSection",
   CellTags->"PrimaryExamplesSection",
   CellID->1249294874]},
 "DiracOrder"->{
  Cell[7586, 243, 179, 6, 27, "Input",
   CellTags->"DiracOrder",
   CellID->1559113060],
  Cell[7768, 251, 569, 23, 39, "Output",
   CellTags->"DiracOrder"],
  Cell[8374, 279, 132, 4, 27, "Input",
   CellTags->"DiracOrder",
   CellID->1074180519],
  Cell[8509, 285, 800, 32, 39, "Output",
   CellTags->"DiracOrder"],
  Cell[9725, 338, 188, 6, 27, "Input",
   CellTags->"DiracOrder",
   CellID->1789420924],
  Cell[9916, 346, 831, 35, 37, "Output",
   CellTags->"DiracOrder"],
  Cell[10784, 386, 132, 4, 27, "Input",
   CellTags->"DiracOrder",
   CellID->1481569664],
  Cell[10919, 392, 861, 34, 37, "Output",
   CellTags->"DiracOrder"],
  Cell[12102, 445, 165, 5, 27, "Input",
   CellTags->"DiracOrder",
   CellID->2005079104],
  Cell[12270, 452, 705, 29, 40, "Output",
   CellTags->"DiracOrder"],
  Cell[13012, 486, 132, 4, 27, "Input",
   CellTags->"DiracOrder",
   CellID->1342940029],
  Cell[13147, 492, 587, 23, 40, "Output",
   CellTags->"DiracOrder"],
  Cell[13771, 520, 159, 5, 27, "Input",
   CellTags->"DiracOrder",
   CellID->71636230],
  Cell[13933, 527, 661, 27, 39, "Output",
   CellTags->"DiracOrder"],
  Cell[14631, 559, 131, 4, 27, "Input",
   CellTags->"DiracOrder",
   CellID->332885129],
  Cell[14765, 565, 442, 17, 39, "Output",
   CellTags->"DiracOrder"],
  Cell[15534, 599, 177, 5, 27, "Input",
   CellTags->"DiracOrder",
   CellID->1751727580],
  Cell[15714, 606, 757, 31, 39, "Output",
   CellTags->"DiracOrder"]}
 }
*)
(*CellTagsIndex
CellTagsIndex->{
 {"PrimaryExamplesSection", 24624, 951},
 {"DiracOrder", 24762, 955}
 }
*)
(*NotebookFileOutline
Notebook[{
Cell[582, 21, 3118, 76, 53, "AnchorBarGrid",
 CellID->1],
Cell[3703, 99, 287, 11, 45, "ObjectNameGrid"],
Cell[CellGroupData[{
Cell[4015, 114, 788, 23, 148, "Usage",
 CellID->2090318364],
Cell[CellGroupData[{
Cell[4828, 141, 738, 24, 31, "NotesSection",
 CellGroupingRules->{"SectionGrouping", 50},
 CellID->465350948],
Cell[5569, 167, 31, 0, 14, "SectionHeaderSpacer"],
Cell[5603, 169, 508, 14, 66, "Notes"],
Cell[CellGroupData[{
Cell[6136, 187, 94, 2, 27, "Input"],
Cell[6233, 191, 659, 16, 75, "Output"]
}, Open  ]]
}, Closed]]
}, Open  ]],
Cell[CellGroupData[{
Cell[6953, 214, 388, 15, 31, "PrimaryExamplesSection",
 CellTags->"PrimaryExamplesSection",
 CellID->1249294874],
Cell[CellGroupData[{
Cell[7366, 233, 195, 6, 26, "ExampleSection",
 CellID->745384244],
Cell[CellGroupData[{
Cell[7586, 243, 179, 6, 27, "Input",
 CellTags->"DiracOrder",
 CellID->1559113060],
Cell[7768, 251, 569, 23, 39, "Output",
 CellTags->"DiracOrder"]
}, Open  ]],
Cell[CellGroupData[{
Cell[8374, 279, 132, 4, 27, "Input",
 CellTags->"DiracOrder",
 CellID->1074180519],
Cell[8509, 285, 800, 32, 39, "Output",
 CellTags->"DiracOrder"]
}, Open  ]],
Cell[CellGroupData[{
Cell[9346, 322, 105, 2, 9, "ExampleDelimiter"],
Cell[9454, 326, 246, 8, 32, "Notes"],
Cell[CellGroupData[{
Cell[9725, 338, 188, 6, 27, "Input",
 CellTags->"DiracOrder",
 CellID->1789420924],
Cell[9916, 346, 831, 35, 37, "Output",
 CellTags->"DiracOrder"]
}, Open  ]],
Cell[CellGroupData[{
Cell[10784, 386, 132, 4, 27, "Input",
 CellTags->"DiracOrder",
 CellID->1481569664],
Cell[10919, 392, 861, 34, 37, "Output",
 CellTags->"DiracOrder"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[11829, 432, 105, 2, 9, "ExampleDelimiter"],
Cell[11937, 436, 140, 5, 32, "Notes"],
Cell[CellGroupData[{
Cell[12102, 445, 165, 5, 27, "Input",
 CellTags->"DiracOrder",
 CellID->2005079104],
Cell[12270, 452, 705, 29, 40, "Output",
 CellTags->"DiracOrder"]
}, Open  ]],
Cell[CellGroupData[{
Cell[13012, 486, 132, 4, 27, "Input",
 CellTags->"DiracOrder",
 CellID->1342940029],
Cell[13147, 492, 587, 23, 40, "Output",
 CellTags->"DiracOrder"]
}, Open  ]],
Cell[CellGroupData[{
Cell[13771, 520, 159, 5, 27, "Input",
 CellTags->"DiracOrder",
 CellID->71636230],
Cell[13933, 527, 661, 27, 39, "Output",
 CellTags->"DiracOrder"]
}, Open  ]],
Cell[CellGroupData[{
Cell[14631, 559, 131, 4, 27, "Input",
 CellTags->"DiracOrder",
 CellID->332885129],
Cell[14765, 565, 442, 17, 39, "Output",
 CellTags->"DiracOrder"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[15256, 588, 105, 2, 9, "ExampleDelimiter"],
Cell[15364, 592, 145, 3, 32, "Notes"],
Cell[CellGroupData[{
Cell[15534, 599, 177, 5, 27, "Input",
 CellTags->"DiracOrder",
 CellID->1751727580],
Cell[15714, 606, 757, 31, 39, "Output",
 CellTags->"DiracOrder"]
}, Open  ]],
Cell[CellGroupData[{
Cell[16508, 642, 86, 2, 27, "Input"],
Cell[16597, 646, 612, 24, 39, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[17246, 675, 276, 8, 27, "Input"],
Cell[17525, 685, 1997, 80, 39, "Output"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[19571, 771, 105, 2, 9, "ExampleDelimiter"],
Cell[19679, 775, 262, 7, 48, "Notes"],
Cell[CellGroupData[{
Cell[19966, 786, 254, 7, 27, "Input"],
Cell[20223, 795, 698, 28, 37, "Output"]
}, Open  ]],
Cell[20936, 826, 272, 8, 49, "Notes"],
Cell[CellGroupData[{
Cell[21233, 838, 324, 9, 27, "Input"],
Cell[21560, 849, 398, 16, 37, "Output"]
}, Open  ]]
}, Open  ]]
}, Open  ]],
Cell[21997, 870, 31, 0, 29, "SectionFooterSpacer"]
}, Open  ]],
Cell[CellGroupData[{
Cell[22065, 875, 270, 12, 31, "SeeAlsoSection",
 CellID->1255426704],
Cell[22338, 889, 367, 13, 56, "SeeAlso"]
}, Open  ]],
Cell[22720, 905, 23, 0, 41, "FooterCell"]
}
]
*)

(* End of internal cache information *)

